%%{init: {'themeVariables': { 'fontSize': '12px'}}}%%
graph TD
    classDef path fill:#eee,stroke:#000,color:#000
    classDef plan fill:#fff,stroke-width:1px,color:#000
    classDef itemplan fill:#fff,stroke-width:2px,color:#000
    classDef unbatchedplan fill:#dff,stroke-width:1px,color:#000
    classDef sideeffectplan fill:#fcc,stroke-width:2px,color:#000
    classDef bucket fill:#f6f6f6,color:#000,stroke-width:2px,text-align:left

    subgraph "Buckets for mutations/v4/pg11.types"
    Bucket0("Bucket 0 (root)"):::bucket
    Bucket1("Bucket 1 (mutationField)<br />Deps: 18, 75, 19, 2<br /><br />1: PgUpdateSingle[15]<br />2: <br />ᐳ: Object[20]"):::bucket
    Bucket2("Bucket 2 (mutationField)<br />Deps: 31, 2<br /><br />1: Access[28]<br />2: Access[29]<br />3: Object[30]<br />4: PgInsertSingle[27]<br />5: <br />ᐳ: Object[32]"):::bucket
    Bucket3("Bucket 3 (nullableBoundary)<br />Deps: 2, 15, 20<br /><br />ROOT Object{1}ᐸ{result}ᐳ[20]"):::bucket
    Bucket4("Bucket 4 (nullableBoundary)<br />Deps: 2, 27, 32<br /><br />ROOT Object{2}ᐸ{result}ᐳ[32]"):::bucket
    Bucket5("Bucket 5 (nullableBoundary)<br />Deps: 15, 47<br /><br />ROOT PgUpdateSingle{1}ᐸtypes(id;)ᐳ[15]<br />1: <br />ᐳ: 34, 33, 37, 39, 41, 43<br />2: PgSelect[44]<br />3: PgSelectRows[49]<br />ᐳ: First[48], PgSelectSingle[50]"):::bucket
    Bucket6("Bucket 6 (nullableBoundary)<br />Deps: 27, 55<br /><br />ROOT PgInsertSingle{2}ᐸtypes()ᐳ[27]<br />1: <br />ᐳ: 36, 35, 38, 40, 42, 51<br />2: PgSelect[52]<br />3: PgSelectRows[57]<br />ᐳ: First[56], PgSelectSingle[58]"):::bucket
    Bucket7("Bucket 7 (nullableBoundary)<br />Deps: 50, 15<br /><br />ROOT PgSelectSingle{5}ᐸfrmcdc_domainConstrainedCompoundTypeᐳ[50]"):::bucket
    Bucket8("Bucket 8 (nullableBoundary)<br />Deps: 58, 27<br /><br />ROOT PgSelectSingle{6}ᐸfrmcdc_domainConstrainedCompoundTypeᐳ[58]"):::bucket
    Bucket9("Bucket 9 (listItem)<br /><br />ROOT __Item{9}ᐸ41ᐳ[59]"):::bucket
    Bucket10("Bucket 10 (listItem)<br /><br />ROOT __Item{10}ᐸ42ᐳ[60]"):::bucket
    end
    Bucket0 --> Bucket1 & Bucket2
    Bucket1 --> Bucket3
    Bucket2 --> Bucket4
    Bucket3 --> Bucket5
    Bucket4 --> Bucket6
    Bucket5 --> Bucket7 & Bucket9
    Bucket6 --> Bucket8 & Bucket10

    %% plan dependencies
    __InputObject9{{"__InputObject[9∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[7]<br />- Constantᐸ'postgraphile_test_authenticator'ᐳ[76]<br />- Constantᐸ'pg11'ᐳ[77]<br />- Constantᐸ[ '2098288669218571759', '2098288669218571760', '20982886692ᐳ[12]"}}:::plan
    __InputObject13{{"__InputObject[13∈0] ➊<br />More deps:<br />- Constantᐸ1ᐳ[78]<br />- Constantᐸundefinedᐳ[7]"}}:::plan
    __InputObject13 --> __InputObject9
    __InputObject22{{"__InputObject[22∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[7]<br />- Constantᐸ'postgraphile_test_visitor'ᐳ[79]<br />- Constantᐸ'c'ᐳ[80]<br />- Constantᐸ[ '2098288669218571759', '2098288669218571760', '20982886692ᐳ[25]"}}:::plan
    __InputObject26{{"__InputObject[26∈0] ➊<br />More deps:<br />- Constantᐸ1ᐳ[78]<br />- Constantᐸundefinedᐳ[7]"}}:::plan
    __InputObject26 --> __InputObject22
    __InputObject6{{"__InputObject[6∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[7]<br />- Constantᐸ12ᐳ[75]"}}:::plan
    __InputObject9 --> __InputObject6
    Object18{{"Object[18∈0] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    Access16{{"Access[16∈0] ➊<br />ᐸ2.pgSettingsᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access17{{"Access[17∈0] ➊<br />ᐸ2.withPgClientᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access16 & Access17 --> Object18
    __InputObject21{{"__InputObject[21∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[7]"}}:::plan
    __InputObject22 --> __InputObject21
    ApplyInput19{{"ApplyInput[19∈0] ➊"}}:::plan
    __InputObject6 --> ApplyInput19
    ApplyInput31{{"ApplyInput[31∈0] ➊"}}:::plan
    __InputObject21 --> ApplyInput31
    __Value2["__Value[2∈0] ➊<br />ᐸcontextᐳ<br />Dependents: 8"]:::plan
    PgUpdateSingle15[["PgUpdateSingle[15∈1] ➊<br />ᐸtypes(id;)ᐳ<br />More deps:<br />- Constantᐸ12ᐳ[75]"]]:::sideeffectplan
    Object18 & ApplyInput19 --> PgUpdateSingle15
    Object20{{"Object[20∈1] ➊<br />ᐸ{result}ᐳ"}}:::plan
    PgUpdateSingle15 --> Object20
    PgInsertSingle27[["PgInsertSingle[27∈2] ➊<br />ᐸtypes()ᐳ"]]:::sideeffectplan
    Object30{{"Object[30∈2] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    Object30 & ApplyInput31 --> PgInsertSingle27
    Access28{{"Access[28∈2] ➊<br />ᐸ2.pgSettingsᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access29{{"Access[29∈2] ➊<br />ᐸ2.withPgClientᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access28 & Access29 --> Object30
    Object32{{"Object[32∈2] ➊<br />ᐸ{result}ᐳ"}}:::plan
    PgInsertSingle27 --> Object32
    Object47{{"Object[47∈3] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    Access45{{"Access[45∈3] ➊<br />ᐸ2.pgSettingsᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access46{{"Access[46∈3] ➊<br />ᐸ2.withPgClientᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access45 & Access46 --> Object47
    Object55{{"Object[55∈4] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    Access53{{"Access[53∈4] ➊<br />ᐸ2.pgSettingsᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access54{{"Access[54∈4] ➊<br />ᐸ2.withPgClientᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access53 & Access54 --> Object55
    PgSelect44[["PgSelect[44∈5] ➊<br />ᐸfrmcdc_domainConstrainedCompoundTypeᐳ"]]:::plan
    PgClassExpression43{{"PgClassExpression[43∈5] ➊<br />ᐸ__types__....ound_type”ᐳ"}}:::plan
    Object47 & PgClassExpression43 --> PgSelect44
    PgClassExpression33{{"PgClassExpression[33∈5] ➊<br />ᐸ__types__.”id”ᐳ"}}:::plan
    Access34{{"Access[34∈5] ➊<br />ᐸ15.tᐳ"}}:::plan
    Access34 --> PgClassExpression33
    PgUpdateSingle15 --> Access34
    PgClassExpression37{{"PgClassExpression[37∈5] ➊<br />ᐸ__types__.”regrole”ᐳ"}}:::plan
    PgClassExpression33 o--o PgClassExpression37
    PgClassExpression39{{"PgClassExpression[39∈5] ➊<br />ᐸ__types__....namespace”ᐳ"}}:::plan
    PgClassExpression37 o--o PgClassExpression39
    PgClassExpression41{{"PgClassExpression[41∈5] ➊<br />ᐸ__types__....ay_domain”ᐳ"}}:::plan
    Access34 --> PgClassExpression41
    Access34 --> PgClassExpression43
    First48{{"First[48∈5] ➊"}}:::plan
    PgSelectRows49[["PgSelectRows[49∈5] ➊"]]:::plan
    PgSelectRows49 --> First48
    PgSelect44 --> PgSelectRows49
    PgSelectSingle50{{"PgSelectSingle[50∈5] ➊<br />ᐸfrmcdc_domainConstrainedCompoundTypeᐳ"}}:::plan
    First48 --> PgSelectSingle50
    PgSelect52[["PgSelect[52∈6] ➊<br />ᐸfrmcdc_domainConstrainedCompoundTypeᐳ"]]:::plan
    PgClassExpression51{{"PgClassExpression[51∈6] ➊<br />ᐸ__types__....ound_type”ᐳ"}}:::plan
    Object55 & PgClassExpression51 --> PgSelect52
    PgClassExpression35{{"PgClassExpression[35∈6] ➊<br />ᐸ__types__.”id”ᐳ"}}:::plan
    Access36{{"Access[36∈6] ➊<br />ᐸ27.tᐳ"}}:::plan
    Access36 --> PgClassExpression35
    PgInsertSingle27 --> Access36
    PgClassExpression38{{"PgClassExpression[38∈6] ➊<br />ᐸ__types__.”regrole”ᐳ"}}:::plan
    PgClassExpression35 o--o PgClassExpression38
    PgClassExpression40{{"PgClassExpression[40∈6] ➊<br />ᐸ__types__....namespace”ᐳ"}}:::plan
    PgClassExpression38 o--o PgClassExpression40
    PgClassExpression42{{"PgClassExpression[42∈6] ➊<br />ᐸ__types__....ay_domain”ᐳ"}}:::plan
    Access36 --> PgClassExpression42
    Access36 --> PgClassExpression51
    First56{{"First[56∈6] ➊"}}:::plan
    PgSelectRows57[["PgSelectRows[57∈6] ➊"]]:::plan
    PgSelectRows57 --> First56
    PgSelect52 --> PgSelectRows57
    PgSelectSingle58{{"PgSelectSingle[58∈6] ➊<br />ᐸfrmcdc_domainConstrainedCompoundTypeᐳ"}}:::plan
    First56 --> PgSelectSingle58
    PgClassExpression61{{"PgClassExpression[61∈7] ➊<br />ᐸ__frmcdc_d...type__.”a”ᐳ"}}:::plan
    PgSelectSingle50 --> PgClassExpression61
    PgClassExpression63{{"PgClassExpression[63∈7] ➊<br />ᐸ__frmcdc_d...type__.”b”ᐳ"}}:::plan
    PgClassExpression61 o--o PgClassExpression63
    PgClassExpression65{{"PgClassExpression[65∈7] ➊<br />ᐸ__frmcdc_d...type__.”c”ᐳ"}}:::plan
    PgClassExpression63 o--o PgClassExpression65
    PgClassExpression67{{"PgClassExpression[67∈7] ➊<br />ᐸ__frmcdc_d...type__.”d”ᐳ"}}:::plan
    PgClassExpression65 o--o PgClassExpression67
    PgClassExpression69{{"PgClassExpression[69∈7] ➊<br />ᐸ__frmcdc_d...type__.”e”ᐳ"}}:::plan
    PgClassExpression67 o--o PgClassExpression69
    PgClassExpression71{{"PgClassExpression[71∈7] ➊<br />ᐸ__frmcdc_d...type__.”f”ᐳ"}}:::plan
    PgClassExpression69 o--o PgClassExpression71
    PgClassExpression73{{"PgClassExpression[73∈7] ➊<br />ᐸ__frmcdc_d....”foo_bar”ᐳ"}}:::plan
    PgClassExpression71 o--o PgClassExpression73
    PgClassExpression62{{"PgClassExpression[62∈8] ➊<br />ᐸ__frmcdc_d...type__.”a”ᐳ"}}:::plan
    PgSelectSingle58 --> PgClassExpression62
    PgClassExpression64{{"PgClassExpression[64∈8] ➊<br />ᐸ__frmcdc_d...type__.”b”ᐳ"}}:::plan
    PgClassExpression62 o--o PgClassExpression64
    PgClassExpression66{{"PgClassExpression[66∈8] ➊<br />ᐸ__frmcdc_d...type__.”c”ᐳ"}}:::plan
    PgClassExpression64 o--o PgClassExpression66
    PgClassExpression68{{"PgClassExpression[68∈8] ➊<br />ᐸ__frmcdc_d...type__.”d”ᐳ"}}:::plan
    PgClassExpression66 o--o PgClassExpression68
    PgClassExpression70{{"PgClassExpression[70∈8] ➊<br />ᐸ__frmcdc_d...type__.”e”ᐳ"}}:::plan
    PgClassExpression68 o--o PgClassExpression70
    PgClassExpression72{{"PgClassExpression[72∈8] ➊<br />ᐸ__frmcdc_d...type__.”f”ᐳ"}}:::plan
    PgClassExpression70 o--o PgClassExpression72
    PgClassExpression74{{"PgClassExpression[74∈8] ➊<br />ᐸ__frmcdc_d....”foo_bar”ᐳ"}}:::plan
    PgClassExpression72 o--o PgClassExpression74
    __Item59[/"__Item[59∈9]<br />ᐸ41ᐳ"\]:::itemplan
    PgClassExpression41 ==> __Item59
    __Item60[/"__Item[60∈10]<br />ᐸ42ᐳ"\]:::itemplan
    PgClassExpression42 ==> __Item60

    %% define steps
    classDef bucket0 stroke:#696969
    class Bucket0,__Value2,__InputObject6,__InputObject9,__InputObject13,Access16,Access17,Object18,ApplyInput19,__InputObject21,__InputObject22,__InputObject26,ApplyInput31 bucket0
    classDef bucket1 stroke:#00bfff
    class Bucket1,PgUpdateSingle15,Object20 bucket1
    classDef bucket2 stroke:#7f007f
    class Bucket2,PgInsertSingle27,Access28,Access29,Object30,Object32 bucket2
    classDef bucket3 stroke:#ffa500
    class Bucket3,Access45,Access46,Object47 bucket3
    classDef bucket4 stroke:#0000ff
    class Bucket4,Access53,Access54,Object55 bucket4
    classDef bucket5 stroke:#7fff00
    class Bucket5,PgClassExpression33,Access34,PgClassExpression37,PgClassExpression39,PgClassExpression41,PgClassExpression43,PgSelect44,First48,PgSelectRows49,PgSelectSingle50 bucket5
    classDef bucket6 stroke:#ff1493
    class Bucket6,PgClassExpression35,Access36,PgClassExpression38,PgClassExpression40,PgClassExpression42,PgClassExpression51,PgSelect52,First56,PgSelectRows57,PgSelectSingle58 bucket6
    classDef bucket7 stroke:#808000
    class Bucket7,PgClassExpression61,PgClassExpression63,PgClassExpression65,PgClassExpression67,PgClassExpression69,PgClassExpression71,PgClassExpression73 bucket7
    classDef bucket8 stroke:#dda0dd
    class Bucket8,PgClassExpression62,PgClassExpression64,PgClassExpression66,PgClassExpression68,PgClassExpression70,PgClassExpression72,PgClassExpression74 bucket8
    classDef bucket9 stroke:#ff0000
    class Bucket9,__Item59 bucket9
    classDef bucket10 stroke:#ffff00
    class Bucket10,__Item60 bucket10

    %% implicit side effects
    PgUpdateSingle15 -.-o Access45
    PgUpdateSingle15 -.-o Access46
    PgInsertSingle27 -.-o Access53
    PgInsertSingle27 -.-o Access54

